package com.readaloud.wicket;

import org.apache.wicket.Component;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;

public class UserLogin extends Form<Component>{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String username;
	private String password;

	
	public UserLogin(String id) {
		super(id);
		add(new TextField<String>("username", new PropertyModel<String>(this, "username")));
		add(new TextField<String>("password", new PropertyModel<String>(this, "password")));
		
		//setMarkupId("search-form");
		// TODO Auto-generated constructor stub
	}
	protected void onSubmit() {
        PageParameters params = new PageParameters();
        params.add("username", getUsername());
        params.add("password",getPassword());
        //setResponsePage(SearchPanel.class, params);
	}
	
	
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}


}
